How cool is that, I can call a patch "SelfHTML". ;-)
Change-Id: I17d36bc45a349c92715b88004aaae046d4f7be1c
* @return string Raw HTML
*/
public static function linkButton( $contents, $attrs, $modifiers = array() ) {
* @return string Raw HTML
*/
public static function linkButton( $contents, $attrs, $modifiers = array() ) {
- return Html::element( 'a',
+ return self::element( 'a',
self::buttonAttributes( $attrs, $modifiers ),
$contents
);
self::buttonAttributes( $attrs, $modifiers ),
$contents
);
public static function submitButton( $contents, $attrs, $modifiers = array() ) {
$attrs['type'] = 'submit';
$attrs['value'] = $contents;
public static function submitButton( $contents, $attrs, $modifiers = array() ) {
$attrs['type'] = 'submit';
$attrs['value'] = $contents;
- return Html::element( 'input', self::buttonAttributes( $attrs, $modifiers ) );
+ return self::element( 'input', self::buttonAttributes( $attrs, $modifiers ) );
$attribs['value'] = $value;
$attribs['name'] = $name;
if ( in_array( $type, array( 'text', 'search', 'email', 'password', 'number' ) ) ) {
$attribs['value'] = $value;
$attribs['name'] = $name;
if ( in_array( $type, array( 'text', 'search', 'email', 'password', 'number' ) ) ) {
- $attribs = Html::getTextInputAttributes( $attribs );
+ $attribs = self::getTextInputAttributes( $attribs );
}
return self::element( 'input', $attribs );
}
}
return self::element( 'input', $attribs );
}
} else {
$spacedValue = $value;
}
} else {
$spacedValue = $value;
}
- return self::element( 'textarea', Html::getTextInputAttributes( $attribs ), $spacedValue );
+ return self::element( 'textarea', self::getTextInputAttributes( $attribs ), $spacedValue );
} elseif ( is_int( $nsId ) ) {
$nsName = $wgContLang->convertNamespace( $nsId );
}
} elseif ( is_int( $nsId ) ) {
$nsName = $wgContLang->convertNamespace( $nsId );
}
- $optionsHtml[] = Html::element(
+ $optionsHtml[] = self::element(
'option', array(
'disabled' => in_array( $nsId, $params['disable'] ),
'value' => $nsId,
'option', array(
'disabled' => in_array( $nsId, $params['disable'] ),
'value' => $nsId,
$ret = '';
if ( isset( $params['label'] ) ) {
$ret = '';
if ( isset( $params['label'] ) ) {
'label', array(
'for' => isset( $selectAttribs['id'] ) ? $selectAttribs['id'] : null,
), $params['label']
'label', array(
'for' => isset( $selectAttribs['id'] ) ? $selectAttribs['id'] : null,
), $params['label']
}
// Wrap options in a <select>
}
// Wrap options in a <select>
- $ret .= Html::openElement( 'select', $selectAttribs )
+ $ret .= self::openElement( 'select', $selectAttribs )
. "\n"
. implode( "\n", $optionsHtml )
. "\n"
. "\n"
. implode( "\n", $optionsHtml )
. "\n"
- . Html::closeElement( 'select' );
+ . self::closeElement( 'select' );
$attribs['version'] = $wgHtml5Version;
}
$attribs['version'] = $wgHtml5Version;
}
- $html = Html::openElement( 'html', $attribs );
+ $html = self::openElement( 'html', $attribs );
if ( $html ) {
$html .= "\n";
if ( $html ) {
$html .= "\n";
* @return string
*/
static function infoBox( $text, $icon, $alt, $class = '' ) {
* @return string
*/
static function infoBox( $text, $icon, $alt, $class = '' ) {
- $s = Html::openElement( 'div', array( 'class' => "mw-infobox $class" ) );
+ $s = self::openElement( 'div', array( 'class' => "mw-infobox $class" ) );
- $s .= Html::openElement( 'div', array( 'class' => 'mw-infobox-left' ) ) .
- Html::element( 'img',
+ $s .= self::openElement( 'div', array( 'class' => 'mw-infobox-left' ) ) .
+ self::element( 'img',
array(
'src' => $icon,
'alt' => $alt,
)
) .
array(
'src' => $icon,
'alt' => $alt,
)
) .
- Html::closeElement( 'div' );
+ self::closeElement( 'div' );
- $s .= Html::openElement( 'div', array( 'class' => 'mw-infobox-right' ) ) .
+ $s .= self::openElement( 'div', array( 'class' => 'mw-infobox-right' ) ) .
- Html::closeElement( 'div' );
- $s .= Html::element( 'div', array( 'style' => 'clear: left;' ), ' ' );
+ self::closeElement( 'div' );
+ $s .= self::element( 'div', array( 'style' => 'clear: left;' ), ' ' );
- $s .= Html::closeElement( 'div' );
+ $s .= self::closeElement( 'div' );
- $s .= Html::element( 'div', array( 'style' => 'clear: left;' ), ' ' );
+ $s .= self::element( 'div', array( 'style' => 'clear: left;' ), ' ' );